PBSelectViewSyntax='select view_def from sys.systable where table_name = ''&ObjectName'' and table_type = 'VIEW' '
PBSelectProcSyntax='select proc_defn from SYS.SYSPROCEDURE JOIN SYS.SYSUSERPERMS where proc_name = ''&ObjectName'' and user_name = ''&ObjectOwner'''
;PBFKeyListSyntax='select puser.user_name, ptbl.table_name, column_name, 0, 0, isnull((select if referential_action='C' then 0 else if referential_action='N' then 2 else 3 endif endif from SYSTRIGGER where table_id=fkt.primary_table_id and foreign_table_id=fkt.foreign_table_id and foreign_key_id=fkt.foreign_key_id and event = 'D') ,1) AS DELETE_RULE , role, fkc.primary_column_id from SYS.SYSTABLE ftbl, SYS.SYSFOREIGNKEY fkt, SYS.SYSTABLE ptbl, SYS.SYSUSERPERMS puser, SYS.SYSUSERPERMS fuser, SYS.SYSFKCOL fkc, SYS.SYSCOLUMN scol where ftbl.table_name = ''&TableName'' and ftbl.creator = fuser.user_id and fuser.user_name = ''&TableOwner'' and ftbl.table_id = fkt.foreign_table_id and fkt.primary_table_id = ptbl.table_id and ptbl.creator = puser.user_id and fkc.foreign_key_id = fkt.foreign_key_id and fkt.foreign_table_id = scol.table_id and fkc.foreign_table_id = scol.table_id and fkc.foreign_column_id = scol.column_id order by role, fkc.primary_column_id '
ShowPlanSyntax='select plan('&sqlsub') from DUMMY'
AddUser='GRANT CONNECT TO &UserID IDENTIFIED BY &Password'
DefaultUserAuthority='GRANT RESOURCE TO &UserID'
ChangeUser='GRANT CONNECT TO &UserID IDENTIFIED BY &Password'
DeleteUser='REVOKE CONNECT FROM &UserID'
SelectUsers='SELECT USER_NAME FROM SYS.SYSUSERPERMS'
SelectTableUsers='SELECT if USER_GROUP='Y' then '*' || USER_NAME else USER_NAME endif FROM SYS.SYSUSERPERMS'
SelectGroups='SELECT USER_NAME FROM SYS.SYSUSERPERMS WHERE USER_GROUP='Y''
AddGroup='GRANT GROUP TO &GroupID'
DeleteGroup='REVOKE GROUP FROM &GroupID'
SelectMembers='SELECT MEMBER_NAME FROM SYS.SYSGROUPS WHERE GROUP_NAME='&sqlsub''
AddMembers='GRANT MEMBERSHIP IN GROUP &GroupID TO &UserID'
DeleteMembers='REVOKE MEMBERSHIP IN GROUP &GroupID FROM &UserID'
[QE_BTRIEVE_SYNTAX]
CreateIndex='CREATE &UNIQUE INDEX &IndexName ON &TableOwner.&TableName (::ColumnIndex[, ::ColumnIndex]...)'
PBSelectProcSyntax='SELECT rdb$routine_source FROM rdb$routines WHERE rdb$routine_name = ''&ObjectName'' '
PBSelectViewSyntax='SELECT rdb$view_source FROM rdb$relations WHERE rdb$relation_name = ''&ObjectName'' '
PBFKeyListSyntax='SELECT '''',i.rdb$relation_name,f.rdb$field_name,f.rdb$field_position,1,1,f.rdb$constraint_name FROM rdbvms$relation_constraints c,rdbvms$relation_constraint_flds f,rdbvms$interrelations i WHERE f.rdb$field_position=(SELECT f2.rdb$field_position FROM rdbvms$relation_constraints c2,rdbvms$relation_constraint_flds f2 WHERE c2.rdb$relation_name=i.rdb$relation_name AND c2.rdb$constraint_name=f2.rdb$constraint_name AND f2.rdb$field_name=i.rdb$field_name) AND c.rdb$constraint_name=f.rdb$constraint_name AND c.rdbvms$refd_constraint_name=i.rdbvms$entity_name1 AND i.rdbvms$usage='Constraint' AND c.rdbvms$constraint_type=3 AND c.rdb$relation_name = ''&TableName'' ORDER BY 2,4'